/*
 * Copyright (c) ShaoxiongDu <Shaoxiong.dev@aliyun.com> 2021 all Rights Reserved
 */

package zh.codegym.task.task07.task0708;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

/* 
最长的字符串
*/

public class Solution {
    private static List<String> strings;

    public static void main(String[] args) throws Exception {
        //在此编写你的代码
        Scanner scanner = new Scanner(System.in);
        strings = new ArrayList();
        for (int i = 0; i < 5; i++) {
            strings.add(scanner.next());
        }

        int max = strings.get(0).length();

        for (int i = 0; i < 5; i++) {
            if (strings.get(i).length() >= max) {
                max = strings.get(i).length();
            }
        }
        for (int i = 0; i < 5; i++) {
            if (strings.get(i).length() == max) {
                System.out.println(strings.get(i));
            }
        }


    }
}
